package ua.com.shkil.jxui.notification;

import java.awt.Image;
import java.awt.Toolkit;
import java.net.URL;

import javax.swing.Icon;
import javax.swing.ImageIcon;

class Utils {

	public static Image getImage(Class<?> clazz, String name) {
		URL iconUrl = clazz.getResource(name);
		return Toolkit.getDefaultToolkit().getImage(iconUrl);
	}

	public static Icon getIcon(Class<?> clazz, String name) {
		return new ImageIcon(getImage(clazz, name));
	}	

}
